package top.soulblack.purchasesale.model;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class WechatTablePage {
    private Integer id;

    private String name;

    private Integer pid;

    private String type;

    private Integer editId;

    private Integer impactTable;

    private Integer auth;

    private Integer sort;

    private Integer paddingData;

    private List<WechatTableColumn> columns;

    private List<Map<String,Object>> data;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type == null ? null : type.trim();
    }

    public Integer getEditId() {
        return editId;
    }

    public void setEditId(Integer editId) {
        this.editId = editId;
    }

    public Integer getImpactTable() {
        return impactTable;
    }

    public void setImpactTable(Integer impactTable) {
        this.impactTable = impactTable;
    }

    public Integer getAuth() {
        return auth;
    }

    public void setAuth(Integer auth) {
        this.auth = auth;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getPaddingData() {
        return paddingData;
    }

    public void setPaddingData(Integer paddingData) {
        this.paddingData = paddingData;
    }

    public List<Map<String,Object>>getData(){return data;}

    public void setData(List<Map<String,Object>> data){this.data = data;}

    public void setColumns(List<WechatTableColumn> columns){this.columns = columns;}

    public List<WechatTableColumn> getColumns(){return columns;}

    public String getColumnsString(){
        String string = new String();
        for(Iterator<WechatTableColumn> it = columns.iterator(); it.hasNext();){
            string+= it.next().getName();
            if(it.hasNext()){
                string+="|"  ;
            }
        }
        return string;
    }
}